<?php

include '../includes/common.inc.php';
include $main_path . 'language/' . $language . '/categories.inc.php';
include $include_path . 'dates.inc.php';

$NOW = time();
// get number of active auctions for this user
$query = "SELECT count(id) AS auctions FROM " . $DBPrefix . "auctions
		  WHERE user = ".$_POST['id_seller']."
		  AND closed = 0
		  AND starts <= '" . $NOW . "'";
$res = mysql_query($query);
if (mysql_num_rows($res)){
    $numero = mysql_fetch_array($res);
}
else $numero[0] = 0;

echo $numero[0];

?>
